﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EFong.Contract
{
    [DataContract]
    public class 飞机票月结对账单
    {
        private Guid _tempID;
        public Guid TempID 
        {
            get { return _tempID; }
            set { _tempID = value; }
        }

        public string _单据号;
        [DataMember]
        public string 单据号
        {
            get { return _单据号; }
            set { _单据号 = value; }
        }

        private decimal _积分;
        [DataMember]
        public decimal 积分
        {
            get { return _积分; }
            set { _积分 = value; }
        }

        private DateTime _出票日期;
        [DataMember]
        public DateTime 出票日期
        {
            get { return _出票日期; }
            set { _出票日期 = value; }
        }

        private DateTime _出发日期;
        [DataMember]
        public DateTime 出发日期
        {
            get { return _出发日期; }
            set { _出发日期 = value; }
        }

        public string _乘客CName = string.Empty;
        [DataMember]
        public string 乘客CName
        {
            get { return _乘客CName; }
            set { _乘客CName = value; }
        }

        public string _乘客EName = string.Empty;
        [DataMember]
        public string 乘客EName
        {
            get { return _乘客EName; }
            set { _乘客EName = value; }
        }

        public string 乘客姓名
        {
            get 
            {
                StringBuilder sb = new StringBuilder();
                if (乘客CName != string.Empty)
                    sb.Append(乘客CName);
                if (乘客EName != string.Empty)
                    if(sb.ToString() == string.Empty)
                        sb.Append(乘客EName);
                    else
                        sb.Append(string.Format("({0})",乘客EName));

                return sb.ToString();
            }
        }

        public string _行程;
        [DataMember]
        public string 行程
        {
            get { return _行程; }
            set { _行程 = value; }
        }
        
        public decimal _金额;
        [DataMember]
        public decimal 金额
        {
            get { return _金额; }
            set { _金额 = value; }
        }

        public decimal _tax1;
        [DataMember]
        public decimal Tax1
        {
            get { return _tax1; }
            set { _tax1 = value; }
        }

        public decimal _tax2;
        [DataMember]
        public decimal Tax2
        {
            get { return _tax2; }
            set { _tax2 = value; }
        }

        public decimal TotalTax
        {
            get { return Tax1 + Tax2; }
        }

        public decimal _机票价格;
        [DataMember]
        public decimal 机票价格
        {
            get { return _机票价格; }
            set { _机票价格 = value; }
        }


        public string _结算方式;
        [DataMember]
        public string 结算方式
        {
            get { return _结算方式; }
            set { _结算方式 = value; }
        }
    }
}
